package com.heima.apis.wemedia;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.ChannelDto;
import com.heima.model.wemedia.dtos.NewExamineDto;
import com.heima.model.wemedia.dtos.SaveChannelDto;
import com.heima.model.wemedia.dtos.SensitiveSelectDto;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-wemedia")
public interface IWemediaClient {

    //查询敏感词
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult list(@RequestBody SensitiveSelectDto dto);

    //添加敏感词
    @PostMapping("/api/v1/sensitive/save")
    public boolean save(@RequestBody WmSensitive sensitive);

    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public boolean delete(@PathVariable("id") Integer id);

    @PostMapping("/api/v1/sensitive/update")
    public boolean update(@RequestBody WmSensitive sensitive);

    @PostMapping("/api/v1/channel/list")
    ResponseResult selectAll(@RequestBody ChannelDto dto);

    @PostMapping("/api/v1/channel/save")
    boolean saveChannel(@RequestBody SaveChannelDto dto);

    @PostMapping("/api/v1/channel/update")
    ResponseResult updateChannel(@RequestBody WmChannel channel);

    @GetMapping("/api/v1/channel/del/{id}")
    ResponseResult deleteChannel(@PathVariable("id") Integer id);


    //查询自媒体文章
    @PostMapping("/api/v1/news/list_vo")
    ResponseResult listVo(NewExamineDto dto);
    //文章详情
    @GetMapping("/api/v1/news/one_vo/{id}")
    ResponseResult oneVo(@PathVariable("id") Integer id);
    //文章审核通过
    @PostMapping("/api/v1/news/auth_pass")
    public ResponseResult authPass(@RequestBody NewExamineDto dto);
    //文章审核不通过
    @PostMapping("/api/v1/news/auth_fail")
    public ResponseResult authFail(@RequestBody NewExamineDto dto);
}
